from 考试系统.数据处理层 import check

from 考试系统.数据处理层.shuju import Class
from 考试系统.数据处理层.shuju import paper as par

from 考试系统.数据处理层.shuju import stu as stu1
def class_add_stu(stus,class_name):
    if(Class.update_students_by_class(class_name,stus))>0:
        return True
    else:
        return False


def class_add_paper(paper,class_name):
    if(Class.update_paper_by_class(class_name,paper))>0:
        return True
    else:
        return False


def stu_find_class_paper(id):
#通过学生id返回班级名字
    class_names = stu1.get_class_bu_stu_id(id)
    class_names = list(class_names)
    return class_names
#通过班级名字返回试卷名字
def class_name_find_paper(name):
    paper = Class.get_class_question_info(name)
    paper1 = list(paper)
    return paper1